-
Notifications
You must be signed in to change notification settings - Fork 458
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Throw an error when running integration installs when uv == False but pip is not installed #2930
Throw an error when running integration installs when uv == False but pip is not installed #2930
Conversation
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
Confirmed to work as expected: which pip
/Library/Frameworks/Python.framework/Versions/3.11/bin/pip
pip uninstall pip
Found existing installation: pip 24.2
Uninstalling pip-24.2:
Would remove:
/Library/Frameworks/Python.framework/Versions/3.11/bin/pip
/Library/Frameworks/Python.framework/Versions/3.11/bin/pip3
/Library/Frameworks/Python.framework/Versions/3.11/bin/pip3.11
/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pip-24.2.dist-info/*
/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pip/*
Proceed (Y/n)?
Successfully uninstalled pip-24.2
pip
zsh: command not found: pip
source .venv/bin/activate
ls
CLA.md README.md alembic.ini infra scripts trivy-secret.yaml
CODE-OF-CONDUCT.md RELEASE_NOTES.md docker pyproject.toml src zen-dev
CONTRIBUTING.md ROADMAP.md docs release-cloudbuild-nightly.yaml stats.html zen-test
LICENSE SECURITY.md examples release-cloudbuild.yaml tests
zenml integration install sklearn -y
Error: Pip is not installed. Please install pip or use the uv flag for package installation. |
Please refer to the linked issue for my bug report. Additional thoughts:
|
src/zenml/cli/integration.py
Outdated
from zenml.integrations.registry import integration_registry | ||
|
||
if uv and not is_uv_installed(): | ||
error( | ||
"UV is not installed but the uv flag was passed in. Please install uv or remove the uv flag." | ||
) | ||
|
||
if not uv and not is_pip_installed(): | ||
error( | ||
"Pip is not installed. Please install pip or use the uv flag for package installation." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One tiny comment: it would be nice to also have the (--uv)
explanation part in the error message here similar to the others
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this! Looks great aside from the one suggestion Michael and I had.
Co-authored-by: Alex Strick van Linschoten <strickvl@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
@mennoliefstingh looks like you need to run our formating script ... its in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM as well. It seems like the linting is failing due to our quickstart example. I am updating the branch and will let the tests run again.
Merging this now. Thank you @mennoliefstingh for your contribution ❤️ |
Describe changes
I implemented a check for pip being installed when not using the
uv
flag. This mitigates issue #2929.Pre-requisites
Please ensure you have done the following:
develop
and the open PR is targetingdevelop
. If your branch wasn't based on develop read Contribution guide on rebasing branch to develop.Types of changes